home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 February: Technology Seed / Mac Tech Seed Feb '97.toast / ODF Release 3 / ODFDev / ODF / OS / FWGraphx / FWGraphx.fr < prev    next >
Encoding:
Text File  |  1996-12-16  |  6.4 KB  |  205 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FWGraphx.fr
  4. //    Release Version:    $ ODF 3 $
  5. //
  6. //    Copyright:            (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef FWGRAPHX_FR
  11. #define FWGRAPHX_FR
  12.  
  13. #ifndef FWBLDDEF_H
  14. #include "FWBldDef.h"
  15. #endif
  16.  
  17. #ifndef FWGRAPHX_K
  18. #include "FWGraphx.k"
  19. #endif
  20.  
  21. #ifndef FWSTRING_FR
  22. #include "FWString.fr"
  23. #endif
  24.  
  25. #ifndef SLGCONST_K
  26. #include "SLGConst.k"
  27. #endif
  28.  
  29. #ifndef FWODMISC_FR
  30. #include "FWODMisc.fr"
  31. #endif
  32.  
  33. //========================================================================================
  34. // type FW_RFont
  35. //========================================================================================
  36.  
  37. type FW_RFont(FW_kFontResourceType) 
  38. {
  39.     FontSize:
  40.         FW_RFixed;
  41.     FontStyle:
  42.         integer;
  43.     FontName:
  44.         FW_RStringData;
  45. };
  46.  
  47. // Standard fonts defined in "SLGConst.k"
  48. #define FW_NORMAL_FONT    { FW_FIX(12), FW_kPlain, "applFont" }    // = Geneva on US systems
  49. #define FW_SYSTEM_FONT    { FW_FIX(12), FW_kPlain, "systemFont" }    // = Chicago on US systems
  50. #define FW_HELVETICA12    { FW_FIX(12), FW_kPlain, "Helvetica" }
  51. #define FW_TIMES12        { FW_FIX(12), FW_kPlain, "Times" }
  52. #define FW_COURIER12    { FW_FIX(12), FW_kPlain, "Courier" }
  53. #define FW_PALATINO12    { FW_FIX(12), FW_kPlain, "Palatino" }
  54.  
  55. //========================================================================================
  56. // type FW_RColor
  57. //========================================================================================
  58.  
  59. type FW_RColor
  60. {
  61. Red:
  62.     integer;
  63. Green:
  64.     integer;
  65. Blue:
  66.     integer;
  67. };
  68.  
  69. //========================================================================================
  70. // standard colors
  71. //========================================================================================
  72.  
  73. #ifdef FW_BUILD_WIN 
  74. #define FW_RGB_BLACK        { 0x00, 0x00, 0x00 }
  75. #define    FW_RGB_WHITE        { 0xFF, 0xFF, 0xFF }
  76. #define    FW_RGB_RED            { 0xFF, 0x00, 0x00 }
  77. #define    FW_RGB_YELLOW        { 0xFF, 0xFF, 0x00 }
  78. #define    FW_RGB_BLUE            { 0x00, 0x00, 0xC0 }
  79. #define    FW_RGB_GREEN        { 0x00, 0xFF, 0x00 }
  80. #define    FW_RGB_BROWN        { 0x80, 0x80, 0x00 }
  81. #define    FW_RGB_PURPLE        { 0xFF, 0x00, 0xFF }
  82. #define    FW_RGB_LIGHT_BLUE    { 0x00, 0x00, 0xFF }
  83. #define    FW_RGB_GRAY            { 0x80, 0x80, 0x80 }
  84. #define    FW_RGB_LIGHT_GRAY    { 0xC0, 0xC0, 0xC0 }
  85. #define    FW_RGB_DARK_GRAY    { 0x40, 0x40, 0x40 }
  86. #endif
  87.  
  88. #ifdef FW_BUILD_MAC
  89. #define FW_RGB_BLACK         { 0x00, 0x00, 0x00 }
  90. #define FW_RGB_WHITE        { 0xFF, 0xFF, 0xFF }
  91. #define FW_RGB_RED            { 0xDD, 0x00, 0x00 }
  92. #define FW_RGB_YELLOW        { 0xFF, 0xFF, 0x00 }
  93. #define FW_RGB_BLUE            { 0x00, 0x00, 0xDD }
  94. #define FW_RGB_GREEN        { 0x00, 0xEE, 0x00 }
  95. #define FW_RGB_BROWN        { 0x99, 0x66, 0x00 }
  96. #define FW_RGB_PURPLE        { 0x66, 0x00, 0x99 }
  97. #define FW_RGB_LIGHT_BLUE    { 0x00, 0x99, 0xFF }
  98. #define FW_RGB_GRAY            { 0x80, 0x80, 0x80 }
  99. #define FW_RGB_LIGHT_GRAY    { 0xC0, 0xC0, 0xC0 }
  100. #define FW_RGB_DARK_GRAY    { 0x40, 0x40, 0x40 }
  101. #endif
  102.  
  103. //========================================================================================
  104. // Pattern Types
  105. //========================================================================================
  106.  
  107. type FW_RPattern : FW_RArchivableObject(Label='patt')
  108. {
  109.     // Abstract pattern base class
  110. };
  111.  
  112. //========================================================================================
  113. // Black and White Pattern Class
  114. //========================================================================================
  115.  
  116. type FW_RBWPattern : FW_RPattern(Label='bwpt')
  117. {
  118. PatternData:
  119.     hex string[8];
  120. };
  121.  
  122. //========================================================================================
  123. // Color Pattern Class
  124. //========================================================================================
  125.  
  126. type FW_RColorPattern : FW_RPattern(Label='copt')
  127. {
  128. PatternData:
  129.     hex string[64];
  130.  
  131. ColorTable:
  132.     integer = $$CountOf(ColorArray);
  133.     array ColorArray
  134.     {
  135.         FW_RColor;
  136.     };
  137. };
  138.  
  139. //========================================================================================
  140. // standard black and white patterns
  141. //========================================================================================
  142.  
  143. #define FW_PATTERN_BLACK         $"FFFF FFFF FFFF FFFF"
  144. #define FW_PATTERN_WHITE         $"0000 0000 0000 0000"
  145. #define FW_PATTERN_GRAY         $"AA55 AA55 AA55 AA55"
  146. #define FW_PATTERN_LIGHT_GRAY     $"8822 8822 8822 8822"
  147. #define FW_PATTERN_DARK_GRAY     $"77DD 77DD 77DD 77DD"
  148. #define FW_PATTERN_HORIZONTAL    $"FF00 0000 FF00 0000"
  149. #define FW_PATTERN_VERTICAL     $"1111 1111 1111 1111"
  150. #define FW_PATTERN_FDIAGONAL     $"8844 2211 8844 2211"
  151. #define FW_PATTERN_BDIAGONAL     $"1122 4488 1122 4488"
  152. #define FW_PATTERN_CROSS         $"8888 88FF 8888 88FF"
  153. #define FW_PATTERN_DIAGCROSS      $"8855 2255 8855 2255"
  154. #define FW_PATTERN_ANT             $"EE77 BBDD EE77 BBDD"
  155.  
  156. //========================================================================================
  157. // type FW_RStyle
  158. //========================================================================================
  159.  
  160. // Standard dashes and styles are defined in "SLGConst.k"
  161.  
  162. type FW_RStyle
  163. {
  164. PenSize:
  165.     FW_RFixed;
  166. Dash:
  167.     integer;
  168. Pattern:
  169.     FW_RPattern;
  170. };
  171.  
  172. //========================================================================================
  173. // standard styles
  174. //========================================================================================
  175.  
  176. #define FW_NORMAL_STYLE        { FW_FIX(1), FW_kSolidLine, FW_RBWPattern(FW_PATTERN_BLACK) }
  177. #define FW_DASH_STYLE        { FW_FIX(1), FW_kDash, FW_RBWPattern(FW_PATTERN_BLACK) }
  178. #define FW_DOT_STYLE        { FW_FIX(1), FW_kDot, FW_RBWPattern(FW_PATTERN_BLACK) }
  179. #define FW_DASHDOT_STYLE    { FW_FIX(1), FW_kDashDot, FW_RBWPattern(FW_PATTERN_BLACK) }
  180. #define FW_DASHDOTDOT_STYLE    { FW_FIX(1), FW_kDashDotDot, FW_RBWPattern(FW_PATTERN_BLACK) }
  181.  
  182. //========================================================================================
  183. // type FW_RInk
  184. //========================================================================================
  185.  
  186. type FW_RInk
  187. {
  188. ForeColor:
  189.     FW_RColor;
  190. BackColor:
  191.     FW_RColor;
  192. TransferMode:
  193.     unsigned longint;
  194. };
  195.  
  196. //========================================================================================
  197. // standard inks
  198. //========================================================================================
  199.  
  200. #define FW_NORMAL_INK        { FW_RGB_BLACK, FW_RGB_WHITE, FW_kCopy }
  201. #define FW_NORMAL_TEXT_INK    { FW_RGB_BLACK, FW_RGB_WHITE, FW_kOr }
  202. #define FW_INVERT_INK        { FW_RGB_BLACK, FW_RGB_WHITE, FW_kInvert }
  203. #define FW_WHITE_ERASE_INK    { FW_RGB_BLACK, FW_RGB_WHITE, FW_kErase }
  204.  
  205. #endif